<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title></title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
    <meta name="renderer" content="webkit">
</head>
<link href="__CDN__/assets/css/frontend.css?v=1627711211" rel="stylesheet">
<link rel="stylesheet" href="/static/layui/css/layui.css" media="all">
<!-- 引入vue  -->
<!--引入 element-ui 的样式-->
<link rel="stylesheet" type="text/css" href="__CDN__/assets/js/vue/index.css">
<script src="__CDN__/assets/js/vue/vue.js"></script>
<!-- 引入element 组件库-->
<script src="__CDN__/assets/js/vue/index.js"></script>
<body>

{$msg.title}

</body>
<style>
    .el-form-item{
        display:flex;
        margin-bottom: 0;
    }
    .el-form-item__content{
        flex: 1;
    }
    .el-input{
        width: 100%;
    }
    .el-form-item__label {
        white-space: nowrap;
    }
    body{
        background-color: #fff;
    }
    .el-card{
        flex: 1 1 0%;
        border: 1px solid rgb(225 225 225);
        padding: 0;
        text-align: center;
        min-width: 140px;
        max-width: 260px;
        margin: 4px;
        cursor: pointer;
    }
    .el-card .el-card__body{
        padding: 5px 0px;
    }
</style>
<script src="https://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
<script>
    txt = "<p>浏览器代号: " + navigator.appCodeName + "</p>";
    txt+= "<p>浏览器名称: " + navigator.appName + "</p>";
    txt+= "<p>浏览器版本: " + navigator.appVersion + "</p>";
    txt+= "<p>启用Cookies: " + navigator.cookieEnabled + "</p>";
    txt+= "<p>硬件平台: " + navigator.platform + "</p>";
    txt+= "<p>用户代理: " + navigator.userAgent + "</p>";
    txt+= "<p>用户代理语言: " + navigator.language + "</p>";
    document.getElementById("example").innerHTML=txt;
     var require = {
        config: {
            "site":{"name":"\u4f73\u5bb6\u8bda\u54c1","cdnurl":"","version":Date.parse(new Date()),"timezone":"Asia\/Shanghai","languages":{"backend":"zh-cn","frontend":"zh-cn"}},
            "upload":{"cdnurl":"","uploadurl":"\/index\/ajax\/upload","bucket":"local","maxsize":"10mb","mimetype":"jpg,png,bmp,jpeg,gif,zip,rar,xls,xlsx,wav,mp4,mp3,pdf","chunking":false,"chunksize":2097152,"savekey":"\/uploads\/{year}{mon}{day}\/{filemd5}{.suffix}","multipart":[],"multiple":false,"storage":"local"},
            "modulename":"roster",
            "controllername":"share",
            "actionname":"roster",
            "jsname":"frontend\/share", 
            "moduleurl":"\/index",
            "language":"zh-cn",
            "token":"c0f4e22a-8882-4c1b-a7d3-21a5805a1d94",
            "__PUBLIC__":"\/","__ROOT__":"\/","__CDN__":""}    
    };
    /*
     * 注意：
     * 1. 所有的JS接口只能在公众号绑定的域名下调用，公众号开发者需要先登录微信公众平台进入“公众号设置”的“功能设置”里填写“JS接口安全域名”。
     * 2. 如果发现在 Android 不能分享自定义内容，请到官网下载最新的包覆盖安装，Android 自定义分享接口需升级至 6.0.2.58 版本及以上。
     * 3. 常见问题及完整 JS-SDK 文档地址：http://mp.weixin.qq.com/wiki/7/aaa137b55fb2e0456bf8dd9148dd613f.html
     *
     * 开发中遇到问题详见文档“附录5-常见错误及解决办法”解决，如仍未能解决可通过以下渠道反馈：
     * 邮箱地址：weixin-open@qq.com
     * 邮件主题：【微信JS-SDK反馈】具体问题
     * 邮件内容说明：用简明的语言描述问题所在，并交代清楚遇到该问题的场景，可附上截屏图片，微信团队会尽快处理你的反馈。
     */
    //这里使用wx调用config接口，填写配置项
    wx.config({
        debug: false,
        appId:'{$signPackage.appId}' ,
        timestamp:'{$signPackage.timestamp}',
        nonceStr:'{$signPackage.nonceStr}' ,
        signature: '{$signPackage.signature}',
        jsApiList: [
            // 所有要调用的 API 都要加到这个列表中
            'onMenuShareTimeline',
            'onMenuShareAppMessage'
        ],success: function(res) {
            // 以键值对的形式返回，可用的api值true，不可用为false
            // 如：{"checkResult":{"chooseImage":true},"errMsg":"checkJsApi:ok"}
        }
    });
    wx.ready(function(){
        wx.onMenuShareTimeline({
            title: '{$msg.title}', // 分享标题
            desc: '{$msg.desc}', // 分享描述
            link: '{$msg.link}', // 分享链接
            imgUrl: '{$msg.image}', // 分享图标
            success: function () {
                //设置成功
            }
        });
        wx.onMenuShareAppMessage({
            title: '{$msg.title}', // 分享标题
            desc: '{$msg.desc}', // 分享描述
            link: '{$msg.link2}', // 分享链接
            imgUrl: '{$msg.image}', // 分享图标
            success: function () {
                //设置成功
            }
        });
    })
</script>
</html>